/**
 * @author joshua
 */

joshua.envios.TabDetalleUPS=Ext.extend( Ext.Panel,{
	tabTip   : "Rastreo de paquete en UPS",
	autoScroll:false,
	iconCls:'upslogoicon',
	closable : true,
	referencia:'OLA-1234',
	
 	initComponent:function(){
 		Ext.apply(this,{
				title    : 'UPS '+this.referencia,
                items:[
                    new Ext.BoxComponent({
                        autoEl: {
                            tag: 'iframe',
                            width:300,
                            height:300,
                            frameborder:0,
                            src: 'http://www.hotmail.com'
                        }
                    })
                ]
                //html:'<div id="asd'+this.id+'"></div>'
                //html:'<iframe width="300" height="380" src="http://www.google.com" frameborder="0"></iframe>'
				//html:'<iframe border="0" width="100%" height="100%" src="http://wwwapps.ups.com/WebTracking/OnlineTool?InquiryNumber='+this.referencia+'&UPS_HTML_License=BC46FCBDD8D5DBE6&IATA=MX&Lang=spa&TypeOfInquiryNumber=R"><p>Your browser does not support iframes.</p></iframe>'
		});
 		joshua.envios.TabDetalleUPS.superclass.initComponent.apply(this,arguments);

         this.on({
             scope: this,
             afterrender: function (v){
                //Ext.get('asd'+this.id).update('<iframe border="0" width="100%" height="100%" src="http://wwwapps.ups.com/WebTracking/OnlineTool?InquiryNumber='+this.referencia+'&UPS_HTML_License=BC46FCBDD8D5DBE6&IATA=MX&Lang=spa&TypeOfInquiryNumber=R"><p>Your browser does not support iframes.</p></iframe>');
             }
         });
 	}
	//cargarEnvio: function (){
	
/*

//		this.getEl().mask('<img src="./img/loading2.gif" style="width:16px;height:16px;" align="rigth; padding:100px 0 0 0;"> Cargando ...');
var v=Ext.get("informacionEnviof");
//alert(v);return ;
	v.load({
			url:'http://wwwapps.ups.com/WebTracking/OnlineTool', 
			params: {
				InquiryNumber:'OLA-6065',
				UPS_HTML_License:"BC46FCBDD8D5DBE6",
				IATA:"MX",
				Lang:"spa",
				UPS_HTML_Version:"3.0",
				TypeOfInquiryNumber:"R",
				nonUPS_body:"BGCOLOR=&quot; #EEEEEE&quot;",
				nonUPS_title:"Company X Package Tracking",
				nonUPS_header:"&lt; CENTER&gt; Company X Tracking Response&lt; /CENTER&gt; &lt; HR&gt;",
				nonUPS_footer:"&lt; HR&gt; &lt;CENTER&gt;Copyright &copy; 2003Company X &lt;/CENTER&gt;"
			},
	
	        scripts: true,
	//        params: "param1=foo&param2=bar",
	        text: "Loading Foo..."
	});
		/*
		var conn=new Ext.data.Connection();
		var _f=this.id;
		conn.request({
			url:'http://wwwapps.ups.com/WebTracking/OnlineTool', 
			params: {
				InquiryNumber:'OLA-6065',
				UPS_HTML_License:"BC46FCBDD8D5DBE6",
				IATA:"MX",
				Lang:"spa",
				UPS_HTML_Version:"3.0",
				TypeOfInquiryNumber:"R",
				nonUPS_body:"BGCOLOR=&quot; #EEEEEE&quot;",
				nonUPS_title:"Company X Package Tracking",
				nonUPS_header:"&lt; CENTER&gt; Company X Tracking Response&lt; /CENTER&gt; &lt; HR&gt;",
				nonUPS_footer:"&lt; HR&gt; &lt;CENTER&gt;Copyright &copy; 2003Company X &lt;/CENTER&gt;"
			},
			scope:this,
			success:function(resp,opt){		

				Ext.get("informacionEnvio").update(resp.responseText);
				this.getEl().unmask();
			}
		});*/
//	}	
 });
  
Ext.reg('tabDetalleEnvioUPS',joshua.envios.TabDetalleUPS);
